﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CharitiesLib;

namespace Charities.ModelViews
{
    class WorthiesView
    {
        public virtual int Id { get; set; }
        public virtual string DisplayName { get; set; }
        public virtual string PhoneNumber { get; set; }
        public virtual string FamilyNumber { get; set; }
        public virtual string NatNumber { get; set; }
        public virtual string CurrentAddress { get; set; }
        public virtual string OreginalAddress { get; set; }
        public virtual string WorthyTypeName { get; set; }
        public virtual DateTime? insertDate { get; set; }
        public  List<Grant> Grants = new List<Grant>();
        public virtual int RelativesCount { get; set; }
        public virtual string needs { get; set; }
        public virtual string Inspector {get;set;}
        public virtual DateTime FromDate { get; set; }
        public virtual DateTime ToDate { get; set; }

        public string NeedsView(List<Need> needs)
        {
            string need="";
            foreach (var n in needs)
            {
                need += n.SupplyType.Name + ":  " + n.Description +" - "+ "\n";
            }
            return need;
        }
        
    }
}
